import { defineStore } from "pinia";
let settingStore = defineStore("setting", {
  state: () => {
    return {
      showInput: false,
      keyword: localStorage.getItem("keyword") || "",
    };
  },
  actions: {
    openInput() {
      this.showInput = true;
    },
    setKeyword(data) {
      this.keyword = data;
      localStorage.setItem("keyword", this.keyword);
    },
    closeInput() {
      this.showInput = false;
    },
  },
});
export default settingStore;
